# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Docs.V1.Model.StructuralElement do
  @moduledoc """
  A StructuralElement describes content that provides structure to the document.

  ## Attributes

  *   `endIndex` (*type:* `integer()`, *default:* `nil`) - The zero-based end index of this structural element, exclusive, in UTF-16 code units.
  *   `paragraph` (*type:* `GoogleApi.Docs.V1.Model.Paragraph.t`, *default:* `nil`) - A paragraph type of structural element.
  *   `sectionBreak` (*type:* `GoogleApi.Docs.V1.Model.SectionBreak.t`, *default:* `nil`) - A section break type of structural element.
  *   `startIndex` (*type:* `integer()`, *default:* `nil`) - The zero-based start index of this structural element, in UTF-16 code units.
  *   `table` (*type:* `GoogleApi.Docs.V1.Model.Table.t`, *default:* `nil`) - A table type of structural element.
  *   `tableOfContents` (*type:* `GoogleApi.Docs.V1.Model.TableOfContents.t`, *default:* `nil`) - A table of contents type of structural element.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :endIndex => integer() | nil,
          :paragraph => GoogleApi.Docs.V1.Model.Paragraph.t() | nil,
          :sectionBreak => GoogleApi.Docs.V1.Model.SectionBreak.t() | nil,
          :startIndex => integer() | nil,
          :table => GoogleApi.Docs.V1.Model.Table.t() | nil,
          :tableOfContents => GoogleApi.Docs.V1.Model.TableOfContents.t() | nil
        }

  field(:endIndex)
  field(:paragraph, as: GoogleApi.Docs.V1.Model.Paragraph)
  field(:sectionBreak, as: GoogleApi.Docs.V1.Model.SectionBreak)
  field(:startIndex)
  field(:table, as: GoogleApi.Docs.V1.Model.Table)
  field(:tableOfContents, as: GoogleApi.Docs.V1.Model.TableOfContents)
end

defimpl Poison.Decoder, for: GoogleApi.Docs.V1.Model.StructuralElement do
  def decode(value, options) do
    GoogleApi.Docs.V1.Model.StructuralElement.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Docs.V1.Model.StructuralElement do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
